package com.woniu.service.command;

import com.woniu.inlet.web.vo.FindUserBuyOrderVo;
import com.woniu.utils.ApplicationContextHolder;
import lombok.Data;

import java.util.List;

@Data
public class FindUserOrderCommand {
    private Long userId;
    private FindUserOrderCommandHandler handler;

    public FindUserOrderCommand(){
        this.handler=ApplicationContextHolder.getApplicationContext()
                .getBean(FindUserOrderCommandHandler.class);
    }

    public FindUserOrderCommand(Long userId){
        this();
        this.userId=userId;
    }

    public Object execute() {
        return handler.findUserOrder(this);
    }


}
